package com.demo.fruit;

/**
 * 抽象水果类
 */
public abstract class Fruit {

    // 水果名称
    public final String name;

    // 水果数量
    public int num;

    public Fruit(String name,int num) {
        this.name = name;
        this.num = num;
    }

    public abstract double getCost();

}
